package com.tky.conference.dao;

import android.database.sqlite.SQLiteDatabase;

import java.util.Map;

import de.greenrobot.dao.AbstractDao;
import de.greenrobot.dao.AbstractDaoSession;
import de.greenrobot.dao.identityscope.IdentityScopeType;
import de.greenrobot.dao.internal.DaoConfig;

import com.tky.conference.dao.LoginInfo;
import com.tky.conference.dao.ComeetingInfo;
import com.tky.conference.dao.AppointInfo;
import com.tky.conference.dao.DeptInfo;
import com.tky.conference.dao.TreeInfo;
import com.tky.conference.dao.HysInfo;

import com.tky.conference.dao.LoginInfoDao;
import com.tky.conference.dao.ComeetingInfoDao;
import com.tky.conference.dao.AppointInfoDao;
import com.tky.conference.dao.DeptInfoDao;
import com.tky.conference.dao.TreeInfoDao;
import com.tky.conference.dao.HysInfoDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see de.greenrobot.dao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig loginInfoDaoConfig;
    private final DaoConfig comeetingInfoDaoConfig;
    private final DaoConfig appointInfoDaoConfig;
    private final DaoConfig deptInfoDaoConfig;
    private final DaoConfig treeInfoDaoConfig;
    private final DaoConfig hysInfoDaoConfig;

    private final LoginInfoDao loginInfoDao;
    private final ComeetingInfoDao comeetingInfoDao;
    private final AppointInfoDao appointInfoDao;
    private final DeptInfoDao deptInfoDao;
    private final TreeInfoDao treeInfoDao;
    private final HysInfoDao hysInfoDao;

    public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        loginInfoDaoConfig = daoConfigMap.get(LoginInfoDao.class).clone();
        loginInfoDaoConfig.initIdentityScope(type);

        comeetingInfoDaoConfig = daoConfigMap.get(ComeetingInfoDao.class).clone();
        comeetingInfoDaoConfig.initIdentityScope(type);

        appointInfoDaoConfig = daoConfigMap.get(AppointInfoDao.class).clone();
        appointInfoDaoConfig.initIdentityScope(type);

        deptInfoDaoConfig = daoConfigMap.get(DeptInfoDao.class).clone();
        deptInfoDaoConfig.initIdentityScope(type);

        treeInfoDaoConfig = daoConfigMap.get(TreeInfoDao.class).clone();
        treeInfoDaoConfig.initIdentityScope(type);

        hysInfoDaoConfig = daoConfigMap.get(HysInfoDao.class).clone();
        hysInfoDaoConfig.initIdentityScope(type);

        loginInfoDao = new LoginInfoDao(loginInfoDaoConfig, this);
        comeetingInfoDao = new ComeetingInfoDao(comeetingInfoDaoConfig, this);
        appointInfoDao = new AppointInfoDao(appointInfoDaoConfig, this);
        deptInfoDao = new DeptInfoDao(deptInfoDaoConfig, this);
        treeInfoDao = new TreeInfoDao(treeInfoDaoConfig, this);
        hysInfoDao = new HysInfoDao(hysInfoDaoConfig, this);

        registerDao(LoginInfo.class, loginInfoDao);
        registerDao(ComeetingInfo.class, comeetingInfoDao);
        registerDao(AppointInfo.class, appointInfoDao);
        registerDao(DeptInfo.class, deptInfoDao);
        registerDao(TreeInfo.class, treeInfoDao);
        registerDao(HysInfo.class, hysInfoDao);
    }
    
    public void clear() {
        loginInfoDaoConfig.getIdentityScope().clear();
        comeetingInfoDaoConfig.getIdentityScope().clear();
        appointInfoDaoConfig.getIdentityScope().clear();
        deptInfoDaoConfig.getIdentityScope().clear();
        treeInfoDaoConfig.getIdentityScope().clear();
        hysInfoDaoConfig.getIdentityScope().clear();
    }

    public LoginInfoDao getLoginInfoDao() {
        return loginInfoDao;
    }

    public ComeetingInfoDao getComeetingInfoDao() {
        return comeetingInfoDao;
    }

    public AppointInfoDao getAppointInfoDao() {
        return appointInfoDao;
    }

    public DeptInfoDao getDeptInfoDao() {
        return deptInfoDao;
    }

    public TreeInfoDao getTreeInfoDao() {
        return treeInfoDao;
    }

    public HysInfoDao getHysInfoDao() {
        return hysInfoDao;
    }

}
